/* Copyright (C) 2021 minglong@iscas.ac.cn
* 
* Apache License Version 2.0许可头：
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* 
*    http://www.apache.org/licenses/LICENSE-2.0
* 
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
<template>
  <el-row :gutter="24">
    <el-col :span="24" style="min-height: 450px">
      <div>
        <el-tabs v-model="activeName" @tab-click="handleClick">
          <el-tab-pane
            label="入门级"
            name="class_a"
          >
            <device-dev-knowledge-table v-bind:data-source="dataL1" />
          </el-tab-pane>
          <el-tab-pane
            label="初级"
            name="class_b"
          >
            <device-dev-knowledge-table v-bind:data-source="dataL3" />
          </el-tab-pane>
          <el-tab-pane label="中级" name="class_c">
            <device-dev-knowledge-table v-bind:data-source="dataL4" />
          </el-tab-pane>
          <el-tab-pane label="高级" name="class_d">
            <device-dev-knowledge-table v-bind:data-source="dataL5" />
          </el-tab-pane>
        </el-tabs>
      </div>
    </el-col>
  </el-row>
</template>
<script>
import DeviceDevKnowledgeTable from "./DeviceDevKnowledgeTable.vue";
export default {
  components: { DeviceDevKnowledgeTable },
  data() {
    return {
      activeName: "class_a",
      dataL1: [
        { ha2: "护花使者", hb2: 1, hd2: 1 },
        { ha2: "护花使者", url: "https://gitee.com/openharmony-sig/vendor_oh_fun/tree/master/bearpi-hm_nano-oh_flower" , hb2: 1, hd2: 1, he4: 1, hg2: 1, hg7: 1, hg15: 1 },
        { ha2: "蓝牙键盘", url: "https://gitee.com/openharmony-sig/vendor_oh_fun/tree/master/hihope_neptune-oh_hid" , hb2: 1, hd2: 1, he4: 1, hg2: 1, hg7: 1, hg15: 1 },
      ],
      dataL3: [
        { ha2: "L0快速开发套件", url: "https://gitee.com/openharmony-sig/knowledge/tree/master/%E6%A1%88%E4%BE%8B/OpenHarmony/L0%E5%BF%AB%E9%80%9F%E5%BC%80%E5%8F%91%E5%A5%97%E4%BB%B6", hb2: 1, hd2: 1, hg2: 1, hg7: 1, hg15: 1 },
        { ha2: "L1快速开发套件", url: "https://gitee.com/openharmony-sig/knowledge/tree/master/%E6%A1%88%E4%BE%8B/OpenHarmony/L1%E5%BF%AB%E9%80%9F%E5%BC%80%E5%8F%91%E5%A5%97%E4%BB%B6", hb2: 1, hd3: 1, hg2: 1, hg7: 1, hg15: 1 },
      ],
      dataL4: [
        { ha2: "智能烟感系统", url: "https://gitee.com/openharmony-sig/knowledge_demo_smart_home/tree/master/dev/docs/smart_smoke_sensation" , hb2: 1, hd2: 1, he4: 1, hg2: 1, hg7: 1, hg15: 1 },
        { ha2: "智能可燃气体检测系统", url: "https://gitee.com/openharmony-sig/knowledge_demo_smart_home/tree/master/dev/docs/smart_gasdetection", hb2: 1, hd2: 1, he4: 1, hg2: 1, hg7: 1, hg15: 1 },
        { ha2: "智能甲醛检测系统", url: "https://gitee.com/openharmony-sig/knowledge_demo_smart_home/tree/master/dev/docs/smart_tvocdetection" , hb2: 1, hd2: 1, he4: 1, hg2: 1, hg7: 1, hg15: 1 },
        { ha2: "智慧窗帘", url: "https://gitee.com/openharmony-sig/knowledge_demo_smart_home/tree/master/dev/docs/smart_curtain" , hb2: 1, hd2: 1, he4: 1, hg2: 1, hg7: 1, hg15: 1 },
        { ha2: "智能扫地机", url: "https://gitee.com/openharmony-sig/knowledge_demo_smart_home/tree/master/dev/docs/smart_cleaner" , hb2: 1, hd2: 1, he4: 1, hg2: 1, hg5: 1, hg7: 1, hg15: 1 },
        { ha2: "智能养花机", url: "https://gitee.com/42690727/knowledge_demo_smart_home/tree/master/dev/docs/smart_flower_machine" , hb2: 1, hd2: 1, he4: 1, hg2: 1, hg5: 1, hg7: 1, hg15: 1 },
        { ha2: "智能垃圾桶", url: "https://gitee.com/openharmony-sig/knowledge_demo_smart_home/dev/team_x/demo_trashcan" , hb2: 1, hd2: 1, he4: 1, hg2: 1, hg7: 1, hg15: 1 },
        { ha2: "智能电子牌", url: "https://gitee.com/openharmony-sig/knowledge_demo_smart_home/tree/master/dev/docs/electronic_borad" , hb2: 1, hd3: 1, hd4: 1, he4: 1, hg2: 1, hg4: 1,  hg5: 1, hg15: 1 },
        { ha2: "智能风扇", url: "https://gitee.com/openharmony-sig/knowledge_demo_smart_home/tree/master/dev/docs/smart_fan" , hb2: 1, hd2: 1, he4: 1, hg2: 1, hg7: 1, hg15: 1 },
        { ha2: "智能手表", url: "https://gitee.com/openharmony-sig/knowledge_demo_smart_home/blob/master/dev/docs/smart_Watch" },
        { ha2: "智能环保系统", url: "https://gitee.com/openharmony-sig/knowledge_demo_smart_home/tree/master/dev/docs/smart_trashcan"},
        { ha2: "智慧台灯", url: "https://gitee.com/openharmony-sig/knowledge_demo_smart_home/tree/master/dev/docs/smart_lamp" , hb2: 1, hd2: 1, he4: 1, hg2: 1, hg7: 1, hg15: 1 },
      ],
      dataL5: [{ ha2: "天才少年机械臂" }],
    };
  },
  methods: {
    handleClick(tab, event) {
      console.log(tab, event);
    },
  },
};
</script>
<style>
.my-label {
  background: #e1f3d8;
}

.my-content {
  background: #fde2e2;
}
</style>
